package com.ziki.bswicket.component;

import com.ziki.bswicket.action.ClickAction;
import com.ziki.framework.wicket.markup.html.link.FwLink;

public class BsLink extends FwLink<String> {
    private static final long serialVersionUID = 1L;
    private ClickAction action;

    public BsLink(String id) {
        super(id);
    }

    @Override
    public void onClick() {
        if (this.action != null) {
            this.action.performClick();
        }
    }

    public void add(ClickAction action) {
        this.action = action;
    }

}
